<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<title>GrPPI: grppi::parallel_execution_omp Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="logo.svg"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">GrPPI
   &#160;<span id="projectnumber">0.2</span>
   </div>
   <div id="projectbrief">Generic and Reusable Parallel Pattern Interface</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="inherits.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="namespacegrppi.html">grppi</a></li><li class="navelem"><a class="el" href="classgrppi_1_1parallel__execution__omp.html">parallel_execution_omp</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="classgrppi_1_1parallel__execution__omp-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">grppi::parallel_execution_omp Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>OpenMP parallel execution policy.  
 <a href="classgrppi_1_1parallel__execution__omp.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="parallel__execution__omp_8h_source.html">parallel_execution_omp.h</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a5ea9694da13f8fd5110bd204cf5710a8"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgrppi_1_1parallel__execution__omp.html#a5ea9694da13f8fd5110bd204cf5710a8">parallel_execution_omp</a> () noexcept</td></tr>
<tr class="memdesc:a5ea9694da13f8fd5110bd204cf5710a8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Default construct an OpenMP parallel execution policy.  <a href="#a5ea9694da13f8fd5110bd204cf5710a8">More...</a><br /></td></tr>
<tr class="separator:a5ea9694da13f8fd5110bd204cf5710a8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7390b569784462e5b8dbaf9d285d1dfd"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgrppi_1_1parallel__execution__omp.html#a7390b569784462e5b8dbaf9d285d1dfd">parallel_execution_omp</a> (int <a class="el" href="classgrppi_1_1parallel__execution__omp.html#ac46ceef1db7f46cc7c93a2e1f4a43f08">concurrency_degree</a>, bool order=true) noexcept</td></tr>
<tr class="memdesc:a7390b569784462e5b8dbaf9d285d1dfd"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set num_threads to _threads in order to run in parallel.  <a href="#a7390b569784462e5b8dbaf9d285d1dfd">More...</a><br /></td></tr>
<tr class="separator:a7390b569784462e5b8dbaf9d285d1dfd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6ecc058267416424d85f5d97a50993f9"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgrppi_1_1parallel__execution__omp.html#a6ecc058267416424d85f5d97a50993f9">set_concurrency_degree</a> (int degree) noexcept</td></tr>
<tr class="memdesc:a6ecc058267416424d85f5d97a50993f9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set number of grppi threads.  <a href="#a6ecc058267416424d85f5d97a50993f9">More...</a><br /></td></tr>
<tr class="separator:a6ecc058267416424d85f5d97a50993f9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac46ceef1db7f46cc7c93a2e1f4a43f08"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgrppi_1_1parallel__execution__omp.html#ac46ceef1db7f46cc7c93a2e1f4a43f08">concurrency_degree</a> () const noexcept</td></tr>
<tr class="memdesc:ac46ceef1db7f46cc7c93a2e1f4a43f08"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get number of grppi trheads.  <a href="#ac46ceef1db7f46cc7c93a2e1f4a43f08">More...</a><br /></td></tr>
<tr class="separator:ac46ceef1db7f46cc7c93a2e1f4a43f08"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a858b1ade4e83c03af95148622791719c"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgrppi_1_1parallel__execution__omp.html#a858b1ade4e83c03af95148622791719c">enable_ordering</a> () noexcept</td></tr>
<tr class="memdesc:a858b1ade4e83c03af95148622791719c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Enable ordering.  <a href="#a858b1ade4e83c03af95148622791719c">More...</a><br /></td></tr>
<tr class="separator:a858b1ade4e83c03af95148622791719c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a162dd5ad2f43ee408c429e0bfd57ba8c"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgrppi_1_1parallel__execution__omp.html#a162dd5ad2f43ee408c429e0bfd57ba8c">disable_ordering</a> () noexcept</td></tr>
<tr class="memdesc:a162dd5ad2f43ee408c429e0bfd57ba8c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Disable ordering.  <a href="#a162dd5ad2f43ee408c429e0bfd57ba8c">More...</a><br /></td></tr>
<tr class="separator:a162dd5ad2f43ee408c429e0bfd57ba8c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a56aa718f05d304ab46d1262f374fa934"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgrppi_1_1parallel__execution__omp.html#a56aa718f05d304ab46d1262f374fa934">is_ordered</a> () const noexcept</td></tr>
<tr class="memdesc:a56aa718f05d304ab46d1262f374fa934"><td class="mdescLeft">&#160;</td><td class="mdescRight">Is execution ordered.  <a href="#a56aa718f05d304ab46d1262f374fa934">More...</a><br /></td></tr>
<tr class="separator:a56aa718f05d304ab46d1262f374fa934"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1985bff1de82cf901697e234dd4a1972"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgrppi_1_1parallel__execution__omp.html#a1985bff1de82cf901697e234dd4a1972">set_queue_attributes</a> (int size, <a class="el" href="namespacegrppi.html#aa0514650a765d4853343655e7588662b">queue_mode</a> mode) noexcept</td></tr>
<tr class="memdesc:a1985bff1de82cf901697e234dd4a1972"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the attributes for the queues built through make_queue&lt;T&gt;(()  <a href="#a1985bff1de82cf901697e234dd4a1972">More...</a><br /></td></tr>
<tr class="separator:a1985bff1de82cf901697e234dd4a1972"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a37f6a3c52b01c8086cf7406daeb11a01"><td class="memTemplParams" colspan="2">template&lt;typename T &gt; </td></tr>
<tr class="memitem:a37f6a3c52b01c8086cf7406daeb11a01"><td class="memTemplItemLeft" align="right" valign="top"><a class="el" href="classgrppi_1_1mpmc__queue.html">mpmc_queue</a>&lt; T &gt;&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classgrppi_1_1parallel__execution__omp.html#a37f6a3c52b01c8086cf7406daeb11a01">make_queue</a> () const </td></tr>
<tr class="memdesc:a37f6a3c52b01c8086cf7406daeb11a01"><td class="mdescLeft">&#160;</td><td class="mdescRight">Makes a communication queue for elements of type T.  <a href="#a37f6a3c52b01c8086cf7406daeb11a01">More...</a><br /></td></tr>
<tr class="separator:a37f6a3c52b01c8086cf7406daeb11a01"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7213bf74afdb228323b3c368d50bb4fd"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgrppi_1_1parallel__execution__omp.html#a7213bf74afdb228323b3c368d50bb4fd">get_thread_id</a> () const noexcept</td></tr>
<tr class="memdesc:a7213bf74afdb228323b3c368d50bb4fd"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get index of current thread in the thread table.  <a href="#a7213bf74afdb228323b3c368d50bb4fd">More...</a><br /></td></tr>
<tr class="separator:a7213bf74afdb228323b3c368d50bb4fd"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>OpenMP parallel execution policy. </p>
<p>This policy uses OpenMP as implementation back-end. </p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a5ea9694da13f8fd5110bd204cf5710a8"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">grppi::parallel_execution_omp::parallel_execution_omp </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">noexcept</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Default construct an OpenMP parallel execution policy. </p>
<p>Creates an OpenMP parallel execution object.</p>
<p>The concurrency degree is determined by the platform according to OpenMP rules. </p>

</div>
</div>
<a class="anchor" id="a7390b569784462e5b8dbaf9d285d1dfd"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">grppi::parallel_execution_omp::parallel_execution_omp </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>concurrency_degree</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>order</em> = <code>true</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">noexcept</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Set num_threads to _threads in order to run in parallel. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">_threads</td><td>number of threads used in the parallel mode Constructs an OpenMP parallel execution policy.</td></tr>
  </table>
  </dd>
</dl>
<p>Creates an OpenMP parallel execution object selecting the concurrency degree and ordering. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">concurrency_degree</td><td>Number of threads used for parallel algorithms. </td></tr>
    <tr><td class="paramname">order</td><td>Whether ordered executions is enabled or disabled. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="ac46ceef1db7f46cc7c93a2e1f4a43f08"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">int grppi::parallel_execution_omp::concurrency_degree </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">noexcept</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Get number of grppi trheads. </p>

</div>
</div>
<a class="anchor" id="a162dd5ad2f43ee408c429e0bfd57ba8c"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void grppi::parallel_execution_omp::disable_ordering </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">noexcept</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Disable ordering. </p>

</div>
</div>
<a class="anchor" id="a858b1ade4e83c03af95148622791719c"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void grppi::parallel_execution_omp::enable_ordering </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">noexcept</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Enable ordering. </p>

</div>
</div>
<a class="anchor" id="a7213bf74afdb228323b3c368d50bb4fd"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">int grppi::parallel_execution_omp::get_thread_id </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">noexcept</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Get index of current thread in the thread table. </p>

</div>
</div>
<a class="anchor" id="a56aa718f05d304ab46d1262f374fa934"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">bool grppi::parallel_execution_omp::is_ordered </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">noexcept</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Is execution ordered. </p>

</div>
</div>
<a class="anchor" id="a37f6a3c52b01c8086cf7406daeb11a01"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classgrppi_1_1mpmc__queue.html">mpmc_queue</a>&lt;T&gt; grppi::parallel_execution_omp::make_queue </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Makes a communication queue for elements of type T. </p>
<p>Constructs a queue using the attributes that can be set via <a class="el" href="classgrppi_1_1parallel__execution__omp.html#a1985bff1de82cf901697e234dd4a1972" title="Sets the attributes for the queues built through make_queue&lt;T&gt;(() ">set_queue_attributes()</a>. The value is returned via move semantics. </p>

</div>
</div>
<a class="anchor" id="a6ecc058267416424d85f5d97a50993f9"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void grppi::parallel_execution_omp::set_concurrency_degree </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>degree</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">noexcept</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Set number of grppi threads. </p>

</div>
</div>
<a class="anchor" id="a1985bff1de82cf901697e234dd4a1972"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void grppi::parallel_execution_omp::set_queue_attributes </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>size</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="namespacegrppi.html#aa0514650a765d4853343655e7588662b">queue_mode</a>&#160;</td>
          <td class="paramname"><em>mode</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">noexcept</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Sets the attributes for the queues built through make_queue&lt;T&gt;(() </p>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="parallel__execution__omp_8h_source.html">parallel_execution_omp.h</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.11
</small></address>
</body>
</html>
